<script setup lang="ts">
// 正确使用方法
import { storeToRefs } from "pinia";
import { useUserStore } from "@/stores/user";
import { onLaunch } from "@dcloudio/uni-app";

const userStore = useUserStore();
const { userInfo, isAuthenticated } = storeToRefs(userStore);

userStore.initialize();


onLaunch(() => {
	uni.onTabBarMidButtonTap(() => {
		uni.navigateTo({
			url: '/pages/chat/chat',
		});
	})
	// 在页面中设置TabBar标记
	// uni.setTabBarBadge({
	//   index: 1, // TabBar的索引，从0开始
	//   text: '5' // 要显示的文字，如果是小红点则传空字符串''
	// })
});
</script>

<template>
  <view>
    <page-meta>
      <navigation-bar />
    </page-meta>
  </view>
</template>
<style lang="scss">
@use "./styles/global.scss";
</style>
